<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="day9.Person"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
		Person p1 = new Person();
		p1.setName("sss");
		Person p2 = new Person();
		p2.setName("dddd");
		List list = new ArrayList();
		list.add(p1);
		list.add(p2);
		request.setAttribute("list", list);
	%>
	
	
<c:forEach var="person" items="${list}">
 ${person.name } 
</c:forEach>
	<br>
	<%
	Map<String,String> map= new HashMap<String,String>();
	map.put("a", "aaaa");
	map.put("b", "bbbb");
	map.put("c", "ccccc");
	map.put("d", "dddd");
	request.setAttribute("map", map);
	%>
	
	<c:forEach var="me" items="${map }">
	${me.key } = ${me.value }
</c:forEach>

<c:if test="${user!=null }">
欢迎您：${user.username }
</c:if>

<c:if test="${user==null }">
用户名：<input type="text" name="name">
密码：<input type="password" name="password">
</c:if>


</body>
</html>